var zxtszbOpt = {
    angleAxis: {
        axisLine: {
            show: false
        },
        axisLabel: {
            show: false
        },
        splitLine: {
            show: false
        },
        axisTick: {
            show: false
        },
        min: 0,
        max: 200,
        boundaryGap: ['0', '100'],
        startAngle: 180
    },
    radiusAxis: {
        type: 'category',
        axisLine: {
            show: false
        },
        axisTick: {
            show: false
        },
        axisLabel: {
            show: false
        },
        data: ['a'],
        z: 10
    },
    polar: {
        radius: '100%',
        center: ['50%', '40%'],
    },
    series: [{
            type: 'bar',
            data: [40],
            coordinateSystem: 'polar',
            barMaxWidth: 10,
            z: 2,
            roundCap: true,
            color: '#53C6CC',
            barGap: '-100%',
        },
        {
            type: 'bar',
            data: [100],
            z: 0,
            silent: true,
            coordinateSystem: 'polar',
            barMaxWidth: 10,
            roundCap: true,
            color: '#F83874',
            barGap: '-100%',
        },
        {
            type: "gauge",
            radius: "60%",
            startAngle: 180, //刻度起始
            endAngle: 0, //刻度结束
            z: 4,
            axisTick: {
                show: false
            },
            splitLine: {
                show: false
            },
            axisLabel: {
                show: false
            }, //刻度节点文字颜色
            pointer: {
                show: false
            },
            axisLine: {
                show: false
            },
            detail: {
                show: true,
                color: '#000',
                offsetCenter: [0, -30],
                textStyle: {
                	rich:{
                		b:{
                			fontSize:24,
                			color: '#000',
                			fontWeight: "bolder",
                			lineHeight: 15
                		},
                		a:{
                			fontSize:16,
                			color: '#000',
                		}
                	}
                }
            },
            data: [{
                name: ""
            }]
        }
    ],

    tooltip: {
        show: false
    },

};

const boy = parseInt(Math.random() * 100)
const girl = parseInt(Math.random() * 100)
const zxtszbTotal = boy + girl

zxtszbOpt.series[0].data=[ boy * 100 / zxtszbTotal];
zxtszbOpt.series[1].data=[ (boy * 100 / zxtszbTotal) + (girl*100 /zxtszbTotal) ];
zxtszbOpt.series[2].detail.formatter = function(e){
	return `{b|${zxtszbTotal}}\n{a|总咨询投诉}`;
}

echarts.init(document.getElementById('zxtszb')).setOption(zxtszbOpt, true);